﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace GEMASTIK_NET
{
    public partial class DataGuru : Form
    {
        DataSet ds = new DataSet();
        Form parent;
        string nip = string.Empty;

        public DataGuru(String eventString, Form parent)
        {
            this.parent = parent;
            InitializeComponent();
        }

        private void DataGuru_FormClosed(object sender, FormClosedEventArgs e)
        {
            this.parent.Enabled = true;
        }

        private void btnOK_Click(object sender, EventArgs e)
        {
            
            this.Close();
        }

        

        private void DataGuru_Load(object sender, EventArgs e)
        {
            // TODO: This line of code loads data into the 'dSGuru.GURU' table. You can move, or remove it, as needed.
            this.gURUTableAdapter.Fill(this.dSGuru.GURU);
        }

        private void dataGridView1_SelectionChanged(object sender, EventArgs e)
        {
            nip = dgvGuru.SelectedCells[0].Value.ToString();
        }

        private void bTambahData_Click(object sender, EventArgs e)
        {
            panelGuru.Enabled = true;
        }

        private void tbNIP_Validating(object sender, CancelEventArgs e)
        {
            if (!(tbNIP.Text.Length > 0))
            {
                valNIP.Visible = true;
            }
        }
    }
}
